<?php

namespace App\Admin\Forms\Settings;

use App\Setting;
use Encore\Admin\Widgets\Form;
use Illuminate\Http\Request;

class ModuleSetting extends BaseForm
{
    public $title = '模块设置';
    protected $type = 'module';
    public $settings = [
        'patent_module'       => '专利模块',
        'software_module'     => '软著模块',
        'plant_module'        => '植物新品种模块',
        'project_module'      => '课题模块',
        'agent_module'        => '代理模块',
        'expert_module'       => '专家模块',
        'auto_score'          => '自动评分',
        'site_change'         => '站点切换',
        'system_code_reorder' => '系统编号删除重新排序'
    ];

    public function form()
    {
        foreach ($this->settings as $slug => $label) {
            $this->radio($slug, $label)->options(['关闭', '开启']);
        }
        $this->disableReset();
    }
}
